package com.kerbores.blog.module;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.GET;
import org.nutz.mvc.annotation.Ok;

import com.kerbores.blog.module.common.BaseModule;
import com.kerbores.blog.service.IAlbumService;
import com.kerbores.utils.entries.Result;

@At("photo")
public class PhotoModule extends BaseModule {

	@Inject
	private IAlbumService albumService;
	@Override
	public String _getNameSpace() {
		return "photo";
	}
	
	@At("/")
	@GET
	@Ok("vel:blog/photo.html")
	public Result photo() {
		return Result.success().setTitle("相册").addData("albums", albumService.list());
	}
}
